<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			* {
				margin: 0;
				padding: 0;
			}
			#wrap{
				width: 300px;
				height: 300px;
				background: pink;
				margin: 50px;
				/*添加了这一个，wrap就变成bfc，和inner的margin就不会重叠*/
				/* overflow: hidden; */
			}
			#inner{
				width: 150px;
				height: 150px;
				background: deeppink;
				margin: 50px;
			}
		</style>
	</head>
	<body>
		<!-- 
		这种属于父子关系的块也会发生重叠!
		-->
		<div id="wrap">
			<div id="inner">
				down
			</div>
		</div>		
	</body>
</html>
